import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import App from './App.vue'
import './premission'
import router from './router'
import 'virtual:svg-icons-register'
import pinia from './store'
import 'element-plus/theme-chalk/dark/css-vars.css'
// 引入全局模板样式
import '@/styles/index.scss'
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 引入自定义插件对象：注册2整个项目全局组件
import gloablComponent from './components/index'
import Categrary from '@/components/Categary/index.vue'
// 引入自定义指令文件
import { isHasButton } from './directive/has'
const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
// 安装自定义插件，触发install方法
app.use(gloablComponent)
app.use(router)
app.use(pinia)
app.component('Categrary', Categrary)
isHasButton(app)
app.mount('#app')

// 获取当前环境变量的数据 属于 对象
// console.log(import.meta.env)
